package com.tbit.main.constant.enums;

/**
 * 停车点类型
 *
 * @author Leon 2019年11月9日 下午1:47:00
 */
public enum ParkPointType {
    PARKPOINT_CIRCULAR_TYPE(0, "圆形停车点"), PARKPOINT_POLYGON_TYPE(1, "多边形停车点"),
    ;
    // 开关类型
    private Integer type;
    // 描述
    private String desc;

    private ParkPointType(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    /**
     * 参数验证
     *
     * @param type
     * @return
     */
    public static Boolean Check(Integer type) {
        Boolean has_task = false;
        for (ParkPointType parkPointType : ParkPointType.values()) {
            if (parkPointType.getType().equals(type)) {
                has_task = true;
                break;
            }
        }
        return has_task;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
